<template>
	<view>
		<view class="header  borde-padd-24" :style="{
			'background':className
		}">
			<view class="header-left" @click="goPages" v-if="rooter!==false">
				<image class="img" :src="imgUrl+'/right.png'" mode=""></image>
			</view>
			<view class="title">{{name}}</view>
		</view>
	</view>
</template>

<script>
	export default{
		// rooter
		props:{
			className:{
				type:[String],
				default:()=>''
			},
			rooter:{
				type:[String],
				default:()=>''
			},
			name:{
				type:[String],
				default:()=>''
			},
		},
		data(){
			return {
				imgUrl:this.imgUrl,
			}
		},
		methods:{
			goPages(path){
				uni.navigateBack({ delta: 1 })
				// uni.redirectTo({
				// 	url:this.rooter||'/pages/ai/index'
				// });
				// // uni.navigateBack({ delta: 2 })
			},
		}
	}
</script>

<style scoped>
	.header{
		height: 90rpx;
		line-height: 90rpx;
		box-sizing: border-box;
		position: relative;
		z-index: 99;
		width: 100%;
	}
	.title{
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		width: 100%;
		color: #0D0E0F;
		margin: 0 auto;
		text-align: center;
		font-style: normal;
		text-transform: none;
	}
	.header-left {
		position: absolute;
		left: 24rpx;
		top: 50%;
		transform: translate(0,-50%);
	}
	.header-left .img{
		width: 30rpx;
		height: 30rpx;
		transform: rotate(-180deg);
	}
	.header-right{
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #3B5EEC;
		font-style: normal;
		text-transform: none;
	}
	.header-right {
		position: absolute;
		right: 24rpx;
		top: 50%;
		transform: translate(0,-50%);
	}
	.header-right .img{
		width: 32rpx;
		height: 32rpx;
		margin-right: 5rpx;
	}
</style>